package com.kantboot.wechat.pay.controller;

import com.kantboot.wechat.pay.entity.PayOrderQuery;
import com.kantboot.wechat.pay.entity.PayUnifiedOrder;
import com.kantboot.wechat.pay.entity.PayingParam;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpRequest;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("/kant-boot-wechat-pay")
public class KantbootWechatPayController {

    @RequestMapping("/get_paying_param")
    public PayingParam getPayingParamr
            (@RequestBody PayUnifiedOrder payUnifiedOrder, HttpServletRequest request){
        return payUnifiedOrder.createPayingParam(request.getHeader(""));
    }

}
